<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Zeroed out',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/08/08.jpg" alt="# Any one But TRUMP # NOT TRUMP 2020" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		For breakfast, I had 58 grams of cereal and 127 grams of soy milk.
		I baked a 472-gram pizza, and split that between lunch and dinner.
		I also had 182 grams of pretzels and a 468-gram smoothie today.
		At the $a[EUGLUG] meeting, I had four sandwich cookies and a few potato chips.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<h3><code>TextView</code></h3>
		<p>
			A <code>TextView</code>, or at least widgets of the unextended <code>TextView</code> class, simply define text on the screen that the user cannot modify.
			The textbook incorrectly refers to these as labels (Murphy, 2011), which provides our first use case for them: you can use them as labels to label things.
			However, a <code>TextView</code> doesn&apos;t serve only to label things.
			Another use case is that you could also use one to display a bit of information from a database.
			For example, an email client might use one <code>TextView</code> to show the title of an email, another to show who its from, and a third to show the body of the email.
		</p>
		<h3><code>Button</code></h3>
		<p>
			A <code>Button</code> is a type of <code>TextView</code> that can be tapped by users to tell your application to do something (Murphy, 2011).
			For example, your application might have a box to tap that has the text &quot;Save&quot; on it that saves your current work on something.
			That would be implemented as a <code>Button</code>.
			Another use of <code>Button</code>s would be in a file manager.
			I think the file manager that came installed with my system uses something else (because it uses both text and icons), but you could easily put a <code>Button</code> with each file&apos;s name in your <code>RecyclerView</code> to do something similar but without the icons.
		</p>
		<h3><code>ImageView</code></h3>
		<p>
			An <code>ImageView</code> simply displays an image on the screen (Murphy, 2011).
			You could use them in some sort of gallery application that displays all your images, for example.
			The camera I use, OpenCamera, seems to also use one to display the last photograph you&apos;ve taken as well.
		</p>
		<h3><code>ImageButton</code></h3>
		<p>
			An <code>ImageButton</code> is a type of <code>ImageView</code> that can be tapped to activate some sort of functionality, similar to a <code>Button</code>, but with an image instead of text (Murphy, 2011).
			For example, before I updated my device, it had a built-in application called Torch installed.
			I&apos;m actually rather annoyed that that application is missing now, and when I have time, I should side-load a similar application (I can&apos;t install directly because I have no service for the thing and use it offline).
			Anyway, Torch showed a large, unlit light bulb in the centre of the screen that when tapped, would swap the image with a lit bulb and turned on the camera&apos;s light to use as a torch.
			Tapping it again flipped the image back and turned the camera light back off.
			That seems like a great use of <code>ImageButton</code>s to me.
			OpenCamera uses an <code>ImageButton</code> to allow the user to indicate that they want a photograph taken of the current camera view.
		</p>
		<h3><code>EditText</code></h3>
		<p>
			An <code>EditText</code> is a type of <code>TextView</code> in which the user is able to modify the text.
			It can be used to allow users to enter information for the application to use (Murphy, 2011).
			OpenCamera has one that lets you set text that all photographs will be stamped with.
			Because I use my camera to take photographs for my online journal, I use that option to stamp all my photographs with the $a[URI] of the website the journal&apos;s a part of.
			Another use would be to allow users to compose an email to someone, or enter said someone&apos;s email address so the application will know where to tell the server to send it.
		</p>
		<h3><code>CheckBox</code></h3>
		<p>
			A <code>CheckBox</code> is a type of <code>TextView</code> that includes a checkbox that can be selected or deselected (Murphy, 2011).
			You could use one for a quiz application, for example, where multiple choices can be selected at once.
			The thing is though that multiple choices can be selected when you use <code>CheckBox</code>es.
			You&apos;re not limited to a single choice.
			You can also use them to allow users to turn parts of an application on and off separately from other components, such as in a graphing calculator.
			You could turn on and off the display of the axes with one <code>CheckBox</code> and turn on and off the display of the graphed line with another.
		</p>
		<h3><code>RadioButton</code></h3>
		<p>
			A <code>RadioButton</code> is a <code>TextView</code> similar to a <code>CheckBox</code>, with the additional stipulation that only one <code>RadioButton</code> in a given <code>RadioGroup</code> can be selected at any given time (Murphy, 2011).
			You could also use these for a quiz application, but on questions that only allow a user to select a single answer.
			Any time you only want the user to select a single option from several, you may want to consider using <code>RadioButton</code>s.
			Another use case would be an application page in which the user was setting the theme of the application.
			They can only have one theme active at a time, so they can only select one theme at at time.
		</p>
		<h3><code>ListView</code></h3>
		<p>
			A <code>ListView</code> displays a list of selectable options.
			Depending on how it&apos;s configured, it can allow for multiple selections or require only a single selection to be made (Murphy, 2011).
			The use cases for this is similar to those of <code>RadioButton</code>s and <code>CheckBox</code>; this widget can fill either role.
			This functionality would be great in a file manager, allowing you to select multiple files or in an application that allows you to choose a server to connect to, only allowing one selection.
		</p>
		<h3><code>Spinner</code></h3>
		<p>
			A <code>Spinner</code> is similar to a <code>ListView</code>, but doesn&apos;t take up as much space until the user decides to begin making their selection (Murphy, 2011).
			This sort of functionality would go well in an application that provided multiple things that needed selections to be made all on the same screen.
			A settings menu would make good use of this.
			So would a calendar application that let you select which month you want to display.
		</p>
		<h3><code>GridView</code></h3>
		<p>
			A <code>GridView</code> is similar to a <code>ListView</code>, but instead of being limited to displaying options in one dimension, it uses two dimensions, forming a grid of choices (Murphy, 2011).
			The first thing that comes to mind when I think of this is an application that allows you to select characters that you can&apos;t normally type and copy them to the clipboard.
			I don&apos;t have one of those on my mobile, but I have one on my laptop, and it really comes in handy sometimes.
			You could also use this widget for a main navigation page to an application that has several functionalities.
			Each item in the grid, when tapped, could bring up the page of a specific functionality.
		</p>
		<div class="APA_references">
			<h3>References:</h3>
			<p>
				Murphy, M. L.
				(2011).
				<a href="https://my.uopeople.edu/mod/resource/view.php?id=178261">The Busy Coder&apos;s Guide to Android Development</a>.
				Retrieved from <code>https://my.uopeople.edu/mod/resource/view.php?id=178261</code>
			</p>
		</div>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/img/CC_BY-SA_3.0/minetest.net./weblog/2019/08/08.png" alt="At least I have my pick." class="framed-centred-image" width="1024" height="600"/>
	<p>
		I started work on the bridges just past the tunnel, and was trying to take my mine cart there to check out what materials I needed.
		For some reason, instead of letting me ride it, the mine cart instead just zeroed out my coordinate, and I ended up near the centre of the map.
		While my tunnel has its crossroad at the very centre of the map, (7.5, 7.5, 7.5, I was at (0, 0, 0), which was in the middle of the mountain inside solid nodes.
		Lovely.
		I happened to have my pick on me though, which was a spot of good luck.
		Otherwise, I&apos;d&apos;ve been stuck in there and had to return to my last backed up copy of the map.
		Once I started digging though, I noticed I was in a gravel patch.
		Even better luck!
		Being in gravel, I could clear out some space even without a pick, so I could have cleared space so my stuff wouldn&apos;t be lost, then used the <code>/killme</code> command to escape and come right back with my pick to retrieve the body.
		Of course, with the pick on hand, there was no need to die in the first place, but being in a gravel patch and having torches with me as well, I easily cleared out the room and got my bearings before planning the best direction to dig to get back to the tunnel and back home.
		I wonder what that bug was though, and how I triggered it.
	</p>
</section>
END
);
